package com.example.springbasic.event;

import lombok.extern.slf4j.Slf4j;
import org.springframework.context.event.EventListener;
import org.springframework.stereotype.Component;

@Component
@Slf4j
public class MsgListener {
    @EventListener
    public void onApplicationEvent(MsgEvent event) {
        log.info("--- message is {} ---",event.getSource());
        log.info("let's do next, send message");
    }
}
